package cn.bdqn.hospital.entity;


import javax.servlet.http.HttpSessionActivationListener;
import javax.servlet.http.HttpSessionBindingEvent;
import javax.servlet.http.HttpSessionBindingListener;
import javax.servlet.http.HttpSessionEvent;
import java.io.Serializable;
import java.time.LocalDateTime;

/**
 * 用户表
 */
public class Employees implements Serializable, HttpSessionBindingListener, HttpSessionActivationListener{
    // 员工id
    private Integer ygId;
    // 员工账号
    private String ygAccount;
    // 员工电话
    private String ygPhone;
    // 员工地址
    private String ygAddress;
    // 员工入职时间
    private LocalDateTime ygInductionDate;
    // 员工头像
    private String ygImage;
    // 员工姓名
    private String ygName;
    // 权限id
    private Integer roleId;
    // 科室id
    private Integer ksId;
    // 员工密码
    private String ygPassword;

    /**
     * 无参构造函数
     */
    public Employees(){}

    /**
     * 有参构造函数
     * @param ygId
     * @param ygAccount
     * @param ygPhone
     * @param ygAddress
     * @param ygInductionDate
     * @param ygImage
     * @param ygName
     * @param roleId
     * @param ksId
     */
    public Employees(Integer ygId, String ygAccount, String ygPhone, String ygAddress, LocalDateTime ygInductionDate, String ygImage, String ygName, Integer roleId, Integer ksId,String ygPassword) {
        this.ygId = ygId;
        this.ygAccount = ygAccount;
        this.ygPhone = ygPhone;
        this.ygAddress = ygAddress;
        this.ygInductionDate = ygInductionDate;
        this.ygImage = ygImage;
        this.ygName = ygName;
        this.roleId = roleId;
        this.ksId = ksId;
        this.ygPassword = ygPassword;

    }

    /**
     * get set
     * @return
     */
    public Integer getYgId() {
        return ygId;
    }

    public void setYgId(Integer ygId) {
        this.ygId = ygId;
    }

    public String getYgAccount() {
        return ygAccount;
    }

    public void setYgAccount(String ygAccount) {
        this.ygAccount = ygAccount;
    }

    public String getYgPhone() {
        return ygPhone;
    }

    public void setYgPhone(String ygPhone) {
        this.ygPhone = ygPhone;
    }

    public String getYgAddress() {
        return ygAddress;
    }

    public void setYgAddress(String ygAddress) {
        this.ygAddress = ygAddress;
    }

    public LocalDateTime getYgInductionDate() {
        return ygInductionDate;
    }

    public void setYgInductionDate(LocalDateTime ygInductionDate) {
        this.ygInductionDate = ygInductionDate;
    }

    public String getYgImage() {
        return ygImage;
    }

    public void setYgImage(String ygImage) {
        this.ygImage = ygImage;
    }

    public String getYgName() {
        return ygName;
    }

    public void setYgName(String ygName) {
        this.ygName = ygName;
    }

    public Integer getRoleId() {
        return roleId;
    }

    public void setRoleId(Integer roleId) {
        this.roleId = roleId;
    }

    public Integer getKsId() {
        return ksId;
    }

    public void setKsId(Integer ksId) {
        this.ksId = ksId;
    }

    public String getYgPassword() {
        return ygPassword;
    }

    public void setYgPassword(String ygPassword) {
        this.ygPassword = ygPassword;
    }

    @Override
    public String toString() {
        return "Employees{" +
                "ygId=" + ygId +
                ", ygAccount='" + ygAccount + '\'' +
                ", ygPhone='" + ygPhone + '\'' +
                ", ygAddress='" + ygAddress + '\'' +
                ", ygInductionDate=" + ygInductionDate +
                ", ygImage='" + ygImage + '\'' +
                ", ygName='" + ygName + '\'' +
                ", roleId=" + roleId +
                ", ksId=" + ksId +
                ", ygPassword='" + ygPassword + '\'' +
                '}';
    }

    @Override
    public void sessionWillPassivate(HttpSessionEvent httpSessionEvent) {

    }

    @Override
    public void sessionDidActivate(HttpSessionEvent httpSessionEvent) {

    }

    /**
     * 绑定：自身被放入到session的属性中
     * @param event
     */
    @Override
    public void valueBound(HttpSessionBindingEvent event) {

    }

    @Override
    public void valueUnbound(HttpSessionBindingEvent httpSessionBindingEvent) {

    }
}
